package war2100.editor;

import java.awt.BorderLayout;
import java.awt.GridLayout;

import javax.swing.JLabel;
import javax.swing.JPanel;

import war2100.Editor;
import war2100.entity.help.*;

public class EntityChoice extends JPanel {
	private static final long serialVersionUID = 8991788980845756053L;
	private Editor editor;
	
	public EntityChoice(Editor editor) {
		this.editor = editor;
		
		JPanel p = new JPanel();
		this.setLayout(new BorderLayout());
		this.add(new JLabel("  Entity-Auswahl"), BorderLayout.NORTH);
		this.add(p);
		
		p.setLayout(new GridLayout(0,4));
		
		p.add(new EntityChoiceButton(this, new PlayerStartPos(editor.getMap(), editor.getPrototypes())));
		p.add(new EntityChoiceButton(this, new NestDifficult(null, editor.getPrototypes())));
		p.add(new EntityChoiceButton(this, new NestNormal(null, editor.getPrototypes())));
		p.add(new EntityChoiceButton(this, new NestEasy(null, editor.getPrototypes())));
	}

	public void setCurrentEntity(BasicHelpEntity currentEntity) {
		editor.setCurrentSetObject(currentEntity);
	}

}
